package com.manage.platform.dto;

import com.manage.platform.vo.CommonVo;
import io.swagger.v3.oas.annotations.media.Schema;
import jakarta.validation.constraints.Null;
import lombok.Data;
import lombok.experimental.Accessors;

import java.io.Serializable;
import java.util.List;

/**
 * YWD
 * 2025/9/23
 */
@Accessors(chain = true)
@Data
public class TaskUpdateDto implements Serializable {

    @Schema(description = "任务ID,修改必传")
    private Long id;

    @Null
    @Schema(description = "创建人用户ID", hidden = true)
    private Long userId;

    @Schema(description = "组织ID(学院/部门)")
    private Long organizeId;

    @Schema(description = "负责人ID")
    private Long assigneeId;

    @Schema(description = "父任务ID(0为顶级任务)",defaultValue = "0L")
    private Long parentId = 0L;

    @Schema(description = "任务名称")
    private String name;

    @Schema(description = "任务层级(1=一级,2=二级,3=三级,4=四级,5=五级)",defaultValue = "1")
    private Integer level = 1;

    @Schema(description = "优先级(1=低,2=中,3=高,4=紧急)",defaultValue = "2")
    private Integer priority = 2;

    @Schema(description = "任务描述")
    private String description;

    @Schema(description = "年度")
    private String annual;

    @Schema(description = "计划开始时间(yyyy-MM-dd HH:mm:ss)")
    private String planStartTime;

    @Schema(description = "计划完成时间(yyyy-MM-dd HH:mm:ss)")
    private String planEndTime;

    @Schema(description = "截止时间(yyyy-MM-dd HH:mm:ss)")
    private String deadline;

    @Schema(description = "实际完成时间(yyyy-MM-dd HH:mm:ss)")
    private String actualEndTime;

    @Schema(description = "标签(多个标签用逗号分隔)")
    private String tags;

    @Schema(description = "备注")
    private String remark;

    @Schema(description = "进度百分比(0-100)",defaultValue = "0")
    private Integer progress = 0;

    @Schema(description = "任务状态(0=未开始,1=进行中,2=已完成,3=已延期)",defaultValue = "0")
    private Integer status = 0;

    //关联数据========================================================
    //任务附件列表
    @Schema(description = "任务附件URL列表")
    private List<String> fileList;

    //参与者列表
    @Schema(description = "参与者列表")
    private List<CommonVo> participantList;

    //任务目标值列表
    @Schema(description = "任务目标值列表")
    private List<TaskTargetDto> targetDtoList;

    //动态&评论列表
    @Schema(description = "动态&评论列表",hidden = true)
    private TaskOperationLogDto taskOperationLogDto;

}